<extend name="Base/common"/> 
<block name="body">
<body style="background:#faf8f8;"><style>.con_empty{	font-size:50px;	color:#E7E6E6;	width:100%;	text-align:center;	font-weight: bold;	line-height:90px;	}.marg{	margin-top:50px;}.IndexList li{	background:#faf8f8;	}#myClass .IndexList li{border:none;}</style>
        <!--首页-->
        <div id="myClass">
            <header><a href="{:U('Index/index')}" class="back"><img src="__IMG__/images/back_03.png"/></a>我的课程</header>
            <div class="indexList">
                <ul class="chosebox">
                    <li class="moren">要学的</li>
                    <li id="h21">要教的</li>
                </ul>
                <div class="IndexList" style="background: #f6f6f6;">
                    <ul class="like block" id="table2">					<if condition="$data2">
                        <volist name='data2' id='vol'>							<li class="course-tr">							
                            <input type="hidden" name="uid" value="{$vol.user_id}">
                            <input type="hidden" name="cid" value="{$vol.id}">
                            <input type="hidden" name="order" value="{$vol.order}">
                            <h3><span class="f-fl">时间：<empty name="vol.class_date">暂无<else />{$vol.class_date|date='Y-m-d H:i:s',###}
                         </empty></span><span class="f-fr">单价：<strong>{$vol.salary}元</strong></span></h3>
                            <div class="per">
                                <a href="javascript:;" class="f-fl"><img src="__ROOT__{$vol.logo|getimg=###}"/></a>
                                <div class="f-fl">
                                    <h1 style="margin-bottom: 15px;">{$vol.nickname}
                                    <if condition="$vol['sex'] eq 1 "><img src="__IMG__/images/nan_03.png"/><else /><img src="__IMG__/images/girl_03.png"/></if></h1>

                                    <p class="moren" ><img src="__IMG__/images/idxe_18.jpg"/>授课: {$vol.title}</p>
									<!-- lkl删除教过次数 -->
                                    <!-- <p style="height:35px;"><img src="__IMG__/images/idxe_24.jpg"/>教过: {$vol.uid|teached}</p> -->
                                    <p style="height:35px;"><img src="__IMG__/images/idxe_27.jpg"/>地址: {$vol.area_id|getParentArea=###}{$vol.area_id|getArea=###}</p>
                                    <eq name="vol.passed" value="1"><img src="__IMG__/images/idxe_21.jpg"/ class="posi"></eq>																								
                                </div>
                                <div class="clear"></div>
                            </div>
                            <div class="clear"></div>
                        </li>
                        </volist>					<else/>							<li>							<div class="con_empty  marg">想学什么</div>							<div class="con_empty">赶紧去预约哦</div>											</li>										</if>
                    </ul>
                    <ul class="like" id="table1" style="display: none;">									<if condition="$data ">				
                    <volist name="data" id="vol">											<li class="course-td">
                            <input type="hidden" name="uid" value="{$vol.uid}">
                            <input type="hidden" name="cid" value="{$vol.cid}">
                            <input type="hidden" name="order" value="{$vol.order}">
                            <h3><span class="f-fl">时间：<empty name="vol.class_date">暂无<else />{$vol.class_date|date='Y-m-d H:i:s',###}
                         </empty></span><span class="f-fr">单价：<strong>{$vol.salary}元</strong></span></h3>
                            <div class="per">
                                <a href="javascript:;" class="f-fl"><img src="__ROOT__{$vol.logo|getimg=###}"/></a>
                                <div class="f-fl">
                                    <h1>{$vol.nickname}<if condition="$vol['sex'] eq 1 "><img src="__IMG__/images/nan_03.png"/><else /><img src="__IMG__/images/girl_03.png"/></if></h1>

                                    <p style="color: #f0af25;width: 385px;overflow: hidden;height: 35px;font-size: 24px;">
                                    <img src="__IMG__/images/idxe_18.jpg"/>授课: {$vol.title}</p>

                                    <!-- <p><img src="__IMG__/images/idxe_24.jpg"/> 授课: {$vol.students}</p> -->
                                    <p><img src="__IMG__/images/idxe_27.jpg"/>地址: {$vol.area_id|getParentArea=###}{$vol.area_id|getArea=###}</p>
                                    <eq name="vol.passed" value="1"><img src="__IMG__/images/idxe_21.jpg"/ class="posi"></eq>									
                                </div>
                                <div class="clear"></div>
                            </div>
                            <div class="clear"></div>
                        </li>
                    </volist>										<else/>							<li>							<div class="con_empty  marg">发布的课程</div>														<div class="con_empty">还没有人预约哦</div>						</li>						</if>
                    </ul>
                </div>
            </div>
        </div>
<script type="text/javascript">
        $('.course-td').on('click',function(){
            var uid = $(this).find('input:hidden').val();
            var cid  = $(this).find('input[name=cid]').val();
            var order = $(this).find('input[name=order]').val();
            window.location.href='__MODULE__/CourseRecord/studentData/uid/'+uid+'/cid/'+cid+'/order/'+order;
        });

        $('#h21').on('click',function(){
            $('#table2').hide();
            $('#table1').show();
        })

        $('.moren').on('click',function(){
            //alert('ok');
            $('#table1').hide();
            $('#table2').show();
        });

        $('.course-tr').on('click',function(){
        var uid = $(this).find('input:hidden').val();
        var cid  = $(this).find('input[name=cid]').val();
        var order = $(this).find('input[name=order]').val();
        window.location.href='__MODULE__/Mycourse/myStudent/uid/'+uid+'/cid/'+cid+'/order/'+order;
        });
</script>
    </body>
</block>